package com.ly.heart.service.impl;

import java.util.Collections;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import com.ly.heart.domain.dto.KingOrderMaterialQueryDto;
import com.ly.heart.domain.dto.KingReceiveNoticeQueryDto;
import com.ly.heart.domain.vo.KingReceiveNoticeVo;
import com.ly.heart.mapper.KingReceiveNoticeMaterialMapper;
import com.ly.heart.service.IKingReceiveNoticeMaterialService;
import org.springframework.stereotype.Service;
import com.ly.heart.domain.KingReceiveNoticeMaterialEntity;
import javax.annotation.Resource;

/**
 * 金蝶-收料通知单物料明细Service业务层处理
 *
 * @author cxl
 * @date 2024-08-09
 */
@Service
public class KingReceiveNoticeMaterialServiceImpl extends ServiceImpl<KingReceiveNoticeMaterialMapper,KingReceiveNoticeMaterialEntity> implements IKingReceiveNoticeMaterialService {

    @Resource
    private KingReceiveNoticeMaterialMapper kingReceiveNoticeMaterialMapper;

    /**
     * 查询金蝶-收料通知单物料明细
     * @param id 金蝶-收料通知单物料明细ID
     * @return 金蝶-收料通知单物料明细
     */
    @Override
    public KingReceiveNoticeMaterialEntity selectKingReceiveNoticeMaterialEntityById(String id)
    {
        return kingReceiveNoticeMaterialMapper.selectKingReceiveNoticeMaterialEntityById(id);
    }

    /**
     * 查询金蝶-收料通知单物料明细列表
     * @param kingReceiveNoticeMaterialEntity 金蝶-收料通知单物料明细
     * @return 金蝶-收料通知单物料明细
     */
    @Override
    public List<KingReceiveNoticeMaterialEntity> selectKingReceiveNoticeMaterialEntityList(KingReceiveNoticeMaterialEntity kingReceiveNoticeMaterialEntity)
    {
        return kingReceiveNoticeMaterialMapper.selectKingReceiveNoticeMaterialEntityList(kingReceiveNoticeMaterialEntity);
    }

    /**
     * 新增金蝶-收料通知单物料明细
     * @param kingReceiveNoticeMaterialEntity 金蝶-收料通知单物料明细
     * @return 结果
     */
    @Override
    public int insertKingReceiveNoticeMaterialEntity(KingReceiveNoticeMaterialEntity kingReceiveNoticeMaterialEntity)
    {
        kingReceiveNoticeMaterialEntity.setCreateTime(DateUtils.getNowDate());
        return kingReceiveNoticeMaterialMapper.insertKingReceiveNoticeMaterialEntity(kingReceiveNoticeMaterialEntity);
    }

    /**
     * 修改金蝶-收料通知单物料明细
     * @param kingReceiveNoticeMaterialEntity 金蝶-收料通知单物料明细
     * @return 结果
     */
    @Override
    public int updateKingReceiveNoticeMaterialEntity(KingReceiveNoticeMaterialEntity kingReceiveNoticeMaterialEntity)
    {
        return kingReceiveNoticeMaterialMapper.updateKingReceiveNoticeMaterialEntity(kingReceiveNoticeMaterialEntity);
    }

    /**
     * 批量删除金蝶-收料通知单物料明细
     * @param ids 需要删除的金蝶-收料通知单物料明细ID
     * @return 结果
     */
    @Override
    public int deleteKingReceiveNoticeMaterialEntityByIds(String[] ids)
    {
        return kingReceiveNoticeMaterialMapper.deleteKingReceiveNoticeMaterialEntityByIds(ids);
    }

    /**
     * 删除金蝶-收料通知单物料明细信息
     * @param id 金蝶-收料通知单物料明细ID
     * @return 结果
     */
    @Override
    public int deleteKingReceiveNoticeMaterialEntityById(String id)
    {
        return kingReceiveNoticeMaterialMapper.deleteKingReceiveNoticeMaterialEntityById(id);
    }

    @Override
    public List<KingReceiveNoticeVo> getReceiveNoticePageList(KingReceiveNoticeQueryDto queryDto) {
        return kingReceiveNoticeMaterialMapper.getReceiveNoticePageList(queryDto);
    }

    @Override
    public String getReceiveNoticeListByOrder(KingOrderMaterialQueryDto queryDto) {
        return kingReceiveNoticeMaterialMapper.getReceiveNoticeListByOrder(queryDto);
    }


}
